<extend name="Public/base"/>

<block name="body">
	<link rel="stylesheet" type="text/css" href="__CSS__/order.css" media="all">
    <div class="main-title">
        <h2>订单管理</h2>
    </div>

    <div class="cf">
        <!-- <button class="btn ajax-post confirm" url="{:U('Brand/del')}" target-form="ids">删 除</button> -->
        <!-- <button class="btn list_sort" url="{:U('sort?group='.I('group'),'','')}">排序</button> -->
        
        <!-- 高级搜索 -->
        <div class="search-form fr cf">
            <div class="sleft">
                <input type="text" name="key" class="search-input" value="{:I('key')}" placeholder="请输用户名或订单号">
                <a class="sch-btn" href="javascript:;" id="search" url="{:U('Order/index')}"><i class="btn-search"></i></a>
            </div>
        </div>
    </div>

    <div class="data-table table-striped">
        <table>
            <thead>
                <tr>
                    <th class="row-selected"></th>
                    <th>商品信息</th>
                    <th>单品价格</th>
                    <th>购买数量</th>
                    <th></th>
                    <th>购买用户</th>
                    <th>订单状态</th>
                    <th>订单金额</th>
                </tr>
            </thead>
            <tbody>
                <notempty name="list">
                <volist name="list" id="brand">
                	<tbody class="order">
                		<tr class="sep-row"><td colspan="9"></td></tr>
	                    <tr class="order-hd">
					   		<td colspan="9">
									<input type="hidden" value="false" name="inRefundStatus_1376991222642915" id="inRefundStatus_1376991222642915">
								<div class="basic-info">
									<span class="order-num">
										<label for="cb1376991222642915">
										   	订单编号：1376991222642915
										</label>
									</span>
									<span class="deal-time">
										成交时间：2015-11-08 19:48
									</span>
								</div>
							</td> 
						</tr>

						<tr class="order-item last" id="item1258629674850475">
							<td class="item" colspan="2">
								<!-- 图片 -->
							    <div class="pic-info">
									<div class="pic s50">
									    <a href="javascript:;"> <img src="//img.alicdn.com/bao/uploaded/i3/TB1kY9VKpXXXXcJXXXXXXXXXXXX_!!0-item_pic.jpg_sum.jpg"></a>
									</div>
								</div>
								<!-- 标题，编码，尺码 -->
								<div class="txt-info">
								    <div class="desc">
								   		<a href="javascript:;"> 2015秋季新款短款小外套名媛唯品会小香风西装长袖上衣正品女装潮</a><br>
									</div>
									
									<div style="word-wrap:break-word;word-break:break-all;">商家编码: Y8657</div>
									
									<div class="props">
										<span>颜色分类: 黑色</span><span>尺码: L</span>
									</div>
								</div>
							</td>  
							<!-- 单品价格 -->
							<td class="price">288.00</td>
							<!-- 数量 -->
							<td title="1" class="num">1</td>
							<!-- 空 -->
							<td class="trouble"><br></td>
							<!-- 用户名 -->
							<td sumrows="1" rowspan="1" class="contact">小伙子</td>  
							<!-- 状态 -->
							<td sumrows="1" rowspan="1" class="trade-status">
								<a href="javascript:;">
							    	<strong class="J_TradeStatus status todo h">买家已付款</strong>
							    </a>
								<a href="javascript:;">详情</a>
								<div class="trade-actions">
									<span class="skin-blue">
										<a href="javascript:;">发货</a>
									</span>
								</div>
							</td>
							<!-- 总价格 -->
							<td sumrows="1" rowspan="1" class="order-price">
							     <strong class="J_OrderPrice">208.00</strong>
								<div class="post-info">
									(含<span class="post-type">快递</span>:<span class="J_PostFee">0.00</span>) 
								</div>
								<!-- 订单类型（手机订单，pc订单） -->
							 	<a href="javascript:;">
									<img src="//img.alicdn.com/tps/i1/T1xRBqXdNAXXXXXXXX-46-16.png">
								</a>

							</td>
							<!-- 空 -->
							<td sumrows="1" rowspan="1" class="remark">
							     
							</td>
						</tr>



                    </tbody>
                </volist>
                <else/>
                <td colspan="9" class="text-center"> aOh! 暂时还没有内容! </td>
                </notempty>
            </tbody>
        </table>
        <!-- 分页 -->
        <div class="page">
            {$_page}
        </div>
    </div>
</block>

<block name="script">
<script type="text/javascript">
$(function(){
    //搜索功能
    $("#search").click(function(){
        var url = $(this).attr('url');
        var query  = $('.search-form').find('input').serialize();
        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
        query = query.replace(/^&/g,'');
        if( url.indexOf('?')>0 ){
            url += '&' + query;
        }else{
            url += '?' + query;
        }
        window.location.href = url;
    });
    //回车搜索
    $(".search-input").keyup(function(e){
        if(e.keyCode === 13){
            $("#search").click();
            return false;
        }
    });
    //点击排序
    $('.list_sort').click(function(){
        var url = $(this).attr('url');
        var ids = $('.ids:checked');
        var param = '';
        if(ids.length > 0){
            var str = new Array();
            ids.each(function(){
                str.push($(this).val());
            });
            param = str.join(',');
        }

        if(url != undefined && url != ''){
            window.location.href = url + '/ids/' + param;
        }
    });
});
</script>
</block>